package com.bawei.module_mine.repository

import com.bawei.module_mine.api.Api
import com.bawei.module_mine.api.MineNetModel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

class LoginRepository @Inject constructor(){
    @Inject
    @MineNetModel.CommonHomeApi
    lateinit var api:Api
    fun login(username:String,password:String)= flow{
        emit(api.login(username,password))
    }.flowOn(Dispatchers.IO)

}


